package com.corpgovernment.organization.dataloader.db;

import com.corpgovernment.costcenter.entity.db.MbOrgProjectDepartment;
import com.corpgovernment.costcenter.mapper.MbOrgProjectDepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author Ks.Xing
 * <p>
 * description:
 * create: 2023-03-11 18:26
 */
@Component
public class MbOrgProjectDepartmentClientLoader {
    @Autowired
    private MbOrgProjectDepartmentMapper mbOrgProjectDepartmentMapper;

    public List<MbOrgProjectDepartment> searchScopeByProId(List<Integer> projectId) {
        Example example = new Example(MbOrgProjectDepartment.class);
        example.createCriteria().andIn("projectId", projectId);
        return mbOrgProjectDepartmentMapper.selectByExample(example);
    }
}
